package com.hjl.listener;

import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;
import javax.servlet.annotation.WebListener;

/**
 * @author ServivE
 * @version 0.1
 * @className MyRequestListener
 * @description
 * @date 2024/7/26 19:48
 * @since jdk11
 */
//监听ServletRequest域创建与销毁的监听器ServletRequestListener
@WebListener
public class MyRequestListener implements ServletRequestListener {
    public void requestDestroyed(ServletRequestEvent servletRequestEvent) {
        System.out.println("request销毁");
    }
    public void requestInitialized(ServletRequestEvent servletRequestEvent) {
        System.out.println("request创建");
    }
}
